#include "BulletCollision/Gimpact/btGImpactShape.h"
#ifdef __cplusplus
extern "C" {
#endif
btTetrahedronShapeEx* bullet_NewbtTetrahedronShapeEx(){
	btTetrahedronShapeEx* wrap_out = new btTetrahedronShapeEx();
	return wrap_out;
}

void bullet_btTetrahedronShapeEx_setVertices(btTetrahedronShapeEx* c_this,btVector3* v0,btVector3* v1,btVector3* v2,btVector3* v3){
	btVector3 const& c_arg_v0=(btVector3 const&)(*v0);
	btVector3 const& c_arg_v1=(btVector3 const&)(*v1);
	btVector3 const& c_arg_v2=(btVector3 const&)(*v2);
	btVector3 const& c_arg_v3=(btVector3 const&)(*v3);
	c_this->setVertices(c_arg_v0,c_arg_v1,c_arg_v2,c_arg_v3);
}

btGImpactQuantizedBvh* bullet_btGImpactShapeInterface_getBoxSet(btGImpactShapeInterface* c_this){
	btGImpactBoxSet const * c_out = c_this->getBoxSet();
	btGImpactQuantizedBvh* wrap_out = (btGImpactQuantizedBvh*)(void*)(c_out);
	return wrap_out;
}

btAABB* bullet_btGImpactShapeInterface_getLocalBox(btGImpactShapeInterface* c_this){
	btAABB const& c_out = c_this->getLocalBox();
	btAABB* wrap_out = (btAABB*)(&c_out);
	return wrap_out;
}

void bullet_btGImpactShapeInterface_getPrimitiveTriangle(btGImpactShapeInterface* c_this,int index,btPrimitiveTriangle* triangle){
	int c_arg_index=index;
	btPrimitiveTriangle& c_arg_triangle=(btPrimitiveTriangle&)(*triangle);
	c_this->getPrimitiveTriangle(c_arg_index,c_arg_triangle);
}

bool bullet_btGImpactShapeInterface_hasBoxSet(btGImpactShapeInterface* c_this){
	bool c_out = c_this->hasBoxSet();
	bool wrap_out = (c_out);
	return wrap_out;
}

void bullet_btGImpactShapeInterface_updateBound(btGImpactShapeInterface* c_this){
	c_this->updateBound();
}

btGImpactMeshShapePart::TrimeshPrimitiveManager* bullet_NewbtGImpactMeshShapePartTrimeshPrimitiveManager(){
	btGImpactMeshShapePart::TrimeshPrimitiveManager* wrap_out = new btGImpactMeshShapePart::TrimeshPrimitiveManager();
	return wrap_out;
}

btGImpactMeshShapePart::TrimeshPrimitiveManager* bullet_NewbtGImpactMeshShapePartTrimeshPrimitiveManager1(btGImpactMeshShapePart::TrimeshPrimitiveManager* manager){
	btGImpactMeshShapePart::TrimeshPrimitiveManager const& c_arg_manager=(btGImpactMeshShapePart::TrimeshPrimitiveManager const&)(*manager);
	btGImpactMeshShapePart::TrimeshPrimitiveManager* wrap_out = new btGImpactMeshShapePart::TrimeshPrimitiveManager(c_arg_manager);
	return wrap_out;
}

btGImpactMeshShapePart::TrimeshPrimitiveManager* bullet_NewbtGImpactMeshShapePartTrimeshPrimitiveManager2(btStridingMeshInterface* meshInterface,int part){
	btStridingMeshInterface * c_arg_meshInterface=(btStridingMeshInterface *)(void*)(meshInterface);
	int c_arg_part=part;
	btGImpactMeshShapePart::TrimeshPrimitiveManager* wrap_out = new btGImpactMeshShapePart::TrimeshPrimitiveManager(c_arg_meshInterface,c_arg_part);
	return wrap_out;
}

void bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_get_bullet_triangle(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this,int prim_index,btTriangleShapeEx* triangle){
	int c_arg_prim_index=prim_index;
	btTriangleShapeEx& c_arg_triangle=(btTriangleShapeEx&)(*triangle);
	c_this->get_bullet_triangle(c_arg_prim_index,c_arg_triangle);
}

void bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_get_indices(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this,int face_index,unsigned int* i0,unsigned int* i1,unsigned int* i2){
	int c_arg_face_index=face_index;
	unsigned int& c_arg_i0=(unsigned int&)(*i0);
	unsigned int& c_arg_i1=(unsigned int&)(*i1);
	unsigned int& c_arg_i2=(unsigned int&)(*i2);
	c_this->get_indices(c_arg_face_index,c_arg_i0,c_arg_i1,c_arg_i2);
}

void bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_get_vertex(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this,unsigned int vertex_index,btVector3* vertex){
	unsigned int c_arg_vertex_index=vertex_index;
	btVector3& c_arg_vertex=(btVector3&)(*vertex);
	c_this->get_vertex(c_arg_vertex_index,c_arg_vertex);
}

int bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_get_vertex_count(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	int c_out = c_this->get_vertex_count();
	int wrap_out = (c_out);
	return wrap_out;
}

unsigned char** bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_GetFieldOfIndexbase(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	return (unsigned char**)(&c_this->indexbase);
}

int bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_GetFieldOfIndexstride(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	return (int)(c_this->indexstride);
}

PHY_ScalarType bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_GetFieldOfIndicestype(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	return (PHY_ScalarType)(c_this->indicestype);
}

int bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_GetFieldOfM_lock_count(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	return (int)(c_this->m_lock_count);
}

double bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_GetFieldOfM_margin(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	return (double)(c_this->m_margin);
}

int bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_GetFieldOfM_part(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	return (int)(c_this->m_part);
}

btVector3* bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_GetFieldOfM_scale(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	return (btVector3*)(&c_this->m_scale);
}

int bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_GetFieldOfNumfaces(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	return (int)(c_this->numfaces);
}

int bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_GetFieldOfNumverts(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	return (int)(c_this->numverts);
}

int bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_GetFieldOfStride(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	return (int)(c_this->stride);
}

PHY_ScalarType bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_GetFieldOfType(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	return (PHY_ScalarType)(c_this->type);
}

unsigned char** bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_GetFieldOfVertexbase(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	return (unsigned char**)(&c_this->vertexbase);
}

void bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_lock(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	c_this->lock();
}

void bullet_btGImpactMeshShapePartTrimeshPrimitiveManager_unlock(btGImpactMeshShapePart::TrimeshPrimitiveManager* c_this){
	c_this->unlock();
}

btGImpactMeshShapePart* bullet_NewbtGImpactMeshShapePart(){
	btGImpactMeshShapePart* wrap_out = new btGImpactMeshShapePart();
	return wrap_out;
}

btGImpactMeshShapePart* bullet_NewbtGImpactMeshShapePart1(btStridingMeshInterface* meshInterface,int part){
	btStridingMeshInterface * c_arg_meshInterface=(btStridingMeshInterface *)(void*)(meshInterface);
	int c_arg_part=part;
	btGImpactMeshShapePart* wrap_out = new btGImpactMeshShapePart(c_arg_meshInterface,c_arg_part);
	return wrap_out;
}

int bullet_btGImpactMeshShapePart_getPart(btGImpactMeshShapePart* c_this){
	int c_out = c_this->getPart();
	int wrap_out = (c_out);
	return wrap_out;
}

btGImpactMeshShapePart::TrimeshPrimitiveManager* bullet_btGImpactMeshShapePart_getTrimeshPrimitiveManager(btGImpactMeshShapePart* c_this){
	btGImpactMeshShapePart::TrimeshPrimitiveManager * c_out = c_this->getTrimeshPrimitiveManager();
	btGImpactMeshShapePart::TrimeshPrimitiveManager* wrap_out = (btGImpactMeshShapePart::TrimeshPrimitiveManager*)(void*)(c_out);
	return wrap_out;
}

void bullet_btGImpactMeshShapePart_getVertex(btGImpactMeshShapePart* c_this,int vertex_index,btVector3* vertex){
	int c_arg_vertex_index=vertex_index;
	btVector3& c_arg_vertex=(btVector3&)(*vertex);
	c_this->getVertex(c_arg_vertex_index,c_arg_vertex);
}

int bullet_btGImpactMeshShapePart_getVertexCount(btGImpactMeshShapePart* c_this){
	int c_out = c_this->getVertexCount();
	int wrap_out = (c_out);
	return wrap_out;
}

btGImpactMeshShapeData* bullet_NewbtGImpactMeshShapeData(){
	btGImpactMeshShapeData* wrap_out = new btGImpactMeshShapeData();
	return wrap_out;
}

float bullet_btGImpactMeshShapeData_GetFieldOfM_collisionMargin(btGImpactMeshShapeData* c_this){
	return (float)(c_this->m_collisionMargin);
}

btCollisionShapeData* bullet_btGImpactMeshShapeData_GetFieldOfM_collisionShapeData(btGImpactMeshShapeData* c_this){
	return (btCollisionShapeData*)(&c_this->m_collisionShapeData);
}

int bullet_btGImpactMeshShapeData_GetFieldOfM_gimpactSubType(btGImpactMeshShapeData* c_this){
	return (int)(c_this->m_gimpactSubType);
}

btVector3FloatData* bullet_btGImpactMeshShapeData_GetFieldOfM_localScaling(btGImpactMeshShapeData* c_this){
	return (btVector3FloatData*)(&c_this->m_localScaling);
}

btStridingMeshInterfaceData* bullet_btGImpactMeshShapeData_GetFieldOfM_meshInterface(btGImpactMeshShapeData* c_this){
	return (btStridingMeshInterfaceData*)(&c_this->m_meshInterface);
}

btGImpactMeshShape* bullet_NewbtGImpactMeshShape(btStridingMeshInterface* meshInterface){
	btStridingMeshInterface * c_arg_meshInterface=(btStridingMeshInterface *)(void*)(meshInterface);
	btGImpactMeshShape* wrap_out = new btGImpactMeshShape(c_arg_meshInterface);
	return wrap_out;
}

btGImpactMeshShapePart* bullet_btGImpactMeshShape_getMeshPart(btGImpactMeshShape* c_this,int index){
	int c_arg_index=index;
	btGImpactMeshShapePart * c_out = c_this->getMeshPart(c_arg_index);
	btGImpactMeshShapePart* wrap_out = (btGImpactMeshShapePart*)(void*)(c_out);
	return wrap_out;
}

btGImpactMeshShapePart* bullet_btGImpactMeshShape_getMeshPart1(btGImpactMeshShape* c_this,int index){
	int c_arg_index=index;
	btGImpactMeshShapePart const * c_out = c_this->getMeshPart(c_arg_index);
	btGImpactMeshShapePart* wrap_out = (btGImpactMeshShapePart*)(void*)(c_out);
	return wrap_out;
}

int bullet_btGImpactMeshShape_getMeshPartCount(btGImpactMeshShape* c_this){
	int c_out = c_this->getMeshPartCount();
	int wrap_out = (c_out);
	return wrap_out;
}

btGImpactCompoundShape::CompoundPrimitiveManager* bullet_NewbtGImpactCompoundShapeCompoundPrimitiveManager(btGImpactCompoundShape::CompoundPrimitiveManager* compound){
	btGImpactCompoundShape::CompoundPrimitiveManager const& c_arg_compound=(btGImpactCompoundShape::CompoundPrimitiveManager const&)(*compound);
	btGImpactCompoundShape::CompoundPrimitiveManager* wrap_out = new btGImpactCompoundShape::CompoundPrimitiveManager(c_arg_compound);
	return wrap_out;
}

btGImpactCompoundShape::CompoundPrimitiveManager* bullet_NewbtGImpactCompoundShapeCompoundPrimitiveManager1(btGImpactCompoundShape* compoundShape){
	btGImpactCompoundShape * c_arg_compoundShape=(btGImpactCompoundShape *)(void*)(compoundShape);
	btGImpactCompoundShape::CompoundPrimitiveManager* wrap_out = new btGImpactCompoundShape::CompoundPrimitiveManager(c_arg_compoundShape);
	return wrap_out;
}

btGImpactCompoundShape::CompoundPrimitiveManager* bullet_NewbtGImpactCompoundShapeCompoundPrimitiveManager2(){
	btGImpactCompoundShape::CompoundPrimitiveManager* wrap_out = new btGImpactCompoundShape::CompoundPrimitiveManager();
	return wrap_out;
}

btGImpactCompoundShape** bullet_btGImpactCompoundShapeCompoundPrimitiveManager_GetFieldOfM_compoundShape(btGImpactCompoundShape::CompoundPrimitiveManager* c_this){
	return (btGImpactCompoundShape**)(&c_this->m_compoundShape);
}

btGImpactCompoundShape* bullet_NewbtGImpactCompoundShape(bool children_has_transform){
	bool c_arg_children_has_transform=children_has_transform;
	btGImpactCompoundShape* wrap_out = new btGImpactCompoundShape(c_arg_children_has_transform);
	return wrap_out;
}

void bullet_btGImpactCompoundShape_addChildShape(btGImpactCompoundShape* c_this,btTransform* localTransform,btCollisionShape* shape){
	btTransform const& c_arg_localTransform=(btTransform const&)(*localTransform);
	btCollisionShape * c_arg_shape=(btCollisionShape *)(void*)(shape);
	c_this->addChildShape(c_arg_localTransform,c_arg_shape);
}

void bullet_btGImpactCompoundShape_addChildShape1(btGImpactCompoundShape* c_this,btCollisionShape* shape){
	btCollisionShape * c_arg_shape=(btCollisionShape *)(void*)(shape);
	c_this->addChildShape(c_arg_shape);
}

btGImpactCompoundShape::CompoundPrimitiveManager* bullet_btGImpactCompoundShape_getCompoundPrimitiveManager(btGImpactCompoundShape* c_this){
	btGImpactCompoundShape::CompoundPrimitiveManager * c_out = c_this->getCompoundPrimitiveManager();
	btGImpactCompoundShape::CompoundPrimitiveManager* wrap_out = (btGImpactCompoundShape::CompoundPrimitiveManager*)(void*)(c_out);
	return wrap_out;
}

#ifdef __cplusplus
}
#endif
